import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Search, Calendar, UserCheck, Car } from "lucide-react";

const steps = [
  {
    icon: Search,
    title: "搜索路线",
    description: "输入出发地和目的地，查找合适的车程"
  },
  {
    icon: Calendar,
    title: "选择时间",
    description: "选择最适合您的出发时间"
  },
  {
    icon: UserCheck,
    title: "预约确认",
    description: "与车主确认行程细节"
  },
  {
    icon: Car,
    title: "开始行程",
    description: "享受安全舒适的拼车体验"
  }
];

export function HowItWorks() {
  return (
    <section className="py-16">
      <div className="container mx-auto px-4">
        <h2 className="text-3xl font-bold text-center mb-12">使用流程</h2>
        <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
          {steps.map((step, index) => (
            <Card key={index} className="text-center">
              <CardHeader>
                <div className="mx-auto w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mb-4">
                  <step.icon className="h-6 w-6 text-primary" />
                </div>
                <CardTitle>{step.title}</CardTitle>
              </CardHeader>
              <CardContent>
                <p className="text-muted-foreground">{step.description}</p>
              </CardContent>
            </Card>
          ))}
        </div>
      </div>
    </section>
  );
}